﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="tm_productList.ascx.cs" Inherits="controls_productList" %>
<center>
    <asp:Panel ID="pnlSearchResult" runat="server" Width="100%"><TABLE width="100%"><TBODY><TR><TD><asp:GridView id="gvItemList" Width="100%" runat="server" CssClass="table" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="productId" OnPageIndexChanging="gvItemList_PageIndexChanging" OnSorting="gvItemList_Sorting">
<PagerSettings Mode="NumericFirstLast"></PagerSettings>
<Columns>
<asp:TemplateField><ItemTemplate>
                                    <asp:CheckBox ID="chkProduct" runat="server"/>
                                    <asp:Label ID="lblProductId" runat="server" Text='<%# Eval("productId") %>' Visible="False"></asp:Label>
    <asp:Label ID="lblSellerId" runat="server" Text='<%# Eval("sellerId") %>' Visible="False"></asp:Label>
                                
</ItemTemplate>

<ItemStyle HorizontalAlign="Center" Width="2%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField><ItemTemplate>
                                    <asp:HyperLink ID="hplProductLogo" runat="server" NavigateUrl='<%# getProductURL(DataBinder.Eval(Container, "DataItem.productId").ToString()) %>'>
                                        <asp:Image ID="imgProductLogo" runat="server" Height='<%# Common.sysLibs.getLogoHeight() %>'
                                            ImageUrl='<%# getImage(DataBinder.Eval(Container, "DataItem.productId").ToString()) %>'
                                            Width='<%# Common.sysLibs.getLogoWidth() %>' />
                                    </asp:HyperLink>
                               
</ItemTemplate>

<ItemStyle Width="10%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sản phẩm" SortExpression="name"><ItemTemplate>
    <asp:HyperLink id="hlpProductName" runat="server" NavigateUrl='<%# getProductURL(DataBinder.Eval(Container, "DataItem.productId").ToString()) %>' Text='<%# Eval("Name") %>'></asp:HyperLink> 
</ItemTemplate>

<HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle"></HeaderStyle>

<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Đơn vị " SortExpression="sellerName"><ItemTemplate>
    &nbsp;<asp:HyperLink ID="hplSellerName" runat="server" NavigateUrl='<%# GetUserURL(Eval("sellerId").ToString()) %>'
        Text='<%# Eval("sellerName") %>'></asp:HyperLink>
                                
</ItemTemplate>
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" />
</asp:TemplateField>
    <asp:BoundField DataField="registerDate" DataFormatString="{0:d}" HeaderText="Ng&#224;y"
        SortExpression="registerDate">
        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" />
    </asp:BoundField>
    <asp:BoundField DataField="lastModifyDate" DataFormatString="{0:d}" HeaderText="Cập nhật"
        SortExpression="lastModifyDate">
        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" />
    </asp:BoundField>
    <asp:BoundField DataField="expireDate" DataFormatString="{0:d}" HeaderText="Hết hạn"
        SortExpression="expireDate">
        <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="8%" />
    </asp:BoundField>
<asp:BoundField DataField="status" HeaderText="Trạng th&#225;i" SortExpression="status">
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>

<ItemStyle HorizontalAlign="Center" Width="9%"></ItemStyle>
</asp:BoundField>
<asp:TemplateField HeaderText=" "><ItemTemplate>
                                    <asp:HyperLink ID="hplContact" runat="server" ImageUrl="~/images/icon_bulkmail_16px.gif" NavigateUrl='<%# GetContactLink(DataBinder.Eval(Container, "DataItem.sellerId").ToString(),DataBinder.Eval(Container, "DataItem.productId").ToString()) %>'>HyperLink</asp:HyperLink>
                                
</ItemTemplate>

<ItemStyle HorizontalAlign="Center" Width="3%"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Ghi ch&#250;" Visible="False"><ItemTemplate>
                                    <asp:Label ID="processNotes" runat="server" Text='<%# Bind("processNotes") %>'></asp:Label>
                                
</ItemTemplate>
    <ItemStyle Width="15%" />
    <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" />
</asp:TemplateField>
</Columns>

<PagerStyle HorizontalAlign="Right"></PagerStyle>
</asp:GridView> </TD></TR>

    <TR><TD>
    <asp:CheckBox id="chkCheckAllProduct" runat="server" AutoPostBack="True" 
                OnCheckedChanged="chkCheckAllProduct_CheckedChanged" CssClass="titleText3" 
                Text="Chọn tất cả"></asp:CheckBox></TD></TR><TR><TD><asp:Panel id="pnlBottom" Width="100%" runat="server"><TABLE width="100%"><TBODY>
        <tr>
            <td align="center" colspan="2">
                <asp:Label ID="lblMessage" runat="server" Visible="False"></asp:Label></td>
        </tr>
        <TR><TD style="WIDTH: 50%;">
        <asp:Label id="lblProductStatus" runat="server" CssClass="titletext3" Text="Trạng thái :"></asp:Label>
        <asp:DropDownList id="cbProductStatus" runat="server"></asp:DropDownList>
        <asp:Button id="btnProcessSelected" onclick="btnProcessSelected_Click" runat="server" CssClass="btn" Text="Đồng ý" Font-Bold="True"></asp:Button></TD>
        
        <TD align=right>
            <asp:Button ID="btnExport" runat="server" CssClass="btn" 
                onclick="btnExport_Click" Text="Excel" />
            &nbsp;
        <asp:Button id="btnDelete" onclick="btnDelete_Click" runat="server" CssClass="btn" 
                Text="Xóa chọn" Font-Bold="True" 
                OnClientClick="return confirm('Xóa tất cả chào bán đã chọn ?')" Visible="False"></asp:Button> 
        </TD>
        </TR>
    </TBODY>
    </TABLE>
    <asp:Label ID="lblDebugMessage" runat="server" Visible="False"></asp:Label></asp:Panel> 
            
        
        
    </TD></TR></TBODY></TABLE></asp:Panel>
</center>
<center>
    </center>    
<asp:Panel ID="pnlRenewal" runat="server" Width="100%" Visible="False">
<fieldset style="background-color:#CCCCCC;width:50%;">
            <legend><label class="titletext3">Ngày gia hạn</label> </legend>
            <asp:TextBox ID="txtNgayGiaHan" runat="server"></asp:TextBox>
                    <asp:HyperLink ID="hplNgayGiaHan" runat="server" ImageUrl="~/images/calendar.png">
                        <asp:Image ID="imgSearchCalendar" runat="server" ImageUrl="~/images/CalendarAJ.png" /></asp:HyperLink>
        &nbsp; &nbsp;
                    <asp:Button ID="btnNgayGiaHan" runat="server" Text="Đồng ý" CssClass="btn" OnClick="btnNgayGiaHan_Click" />    
        </fieldset>
</asp:Panel>
    
    
